-
Notifications
You must be signed in to change notification settings - Fork 9.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
r/budgets_budget_action - new resource #19554
Conversation
b24be9c
to
cf4cc3a
Compare
% make testacc TEST=./aws TESTARGS='-run=TestAccAWSBudgetsBudgetAction_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSBudgetsBudgetAction_ -timeout 180m
=== RUN TestAccAWSBudgetsBudgetAction_basic
=== PAUSE TestAccAWSBudgetsBudgetAction_basic
=== RUN TestAccAWSBudgetsBudgetAction_disappears
=== PAUSE TestAccAWSBudgetsBudgetAction_disappears
=== CONT TestAccAWSBudgetsBudgetAction_basic
=== CONT TestAccAWSBudgetsBudgetAction_disappears
resource_aws_budgets_budget_action_test.go:120: Step 1/1 error: Check failed: Check 2/2 error: Deleting Budget Action failed: ResourceLockedException: This method is not allowed during [ActionStatus: Execution_In_Progress]
--- FAIL: TestAccAWSBudgetsBudgetAction_disappears (15.55s)
=== CONT TestAccAWSBudgetsBudgetAction_basic
testing_new.go:63: Error running post-test destroy, there may be dangling resources: exit status 1
2021/06/08 09:15:13 [DEBUG] Using modified User-Agent: Terraform/0.12.31 HashiCorp-terraform-exec/0.13.3
Error: Deleting Budget Action failed: ResourceLockedException: This method is not allowed during [ActionStatus: Execution_In_Progress]
--- FAIL: TestAccAWSBudgetsBudgetAction_basic (19.96s)
FAIL
FAIL github.com/terraform-providers/terraform-provider-aws/aws 23.434s
FAIL
make: *** [testacc] Error 1 When I then view the budget action it's in % aws budgets describe-budget-actions-for-account --account-id 123456789012
{
"Actions": [
{
"ActionId": "69be9bb5-11b0-4a67-aad0-dbd9fcb68e0d",
"BudgetName": "tf-acc-test-1612764617238458539",
"NotificationType": "ACTUAL",
"ActionType": "APPLY_IAM_POLICY",
"ActionThreshold": {
"ActionThresholdValue": 100.0,
"ActionThresholdType": "ABSOLUTE_VALUE"
},
"Definition": {
"IamActionDefinition": {
"PolicyArn": "arn:aws:iam::123456789012:policy/tf-acc-test-1612764617238458539",
"Roles": [
"tf-acc-test-1612764617238458539"
]
}
},
"ExecutionRoleArn": "arn:aws:iam::123456789012:role/tf-acc-test-1612764617238458539",
"ApprovalModel": "AUTOMATIC",
"Status": "EXECUTION_FAILURE",
"Subscribers": [
{
"SubscriptionType": "EMAIL",
"Address": "test@test.test"
}
]
}
]
}
% aws budgets delete-budget-action --account-id 123456789012 --budget-name "tf-acc-test-1612764617238458539" --action-id "69be9bb5-11b0-4a67-aad0-dbd9fcb68e0d"
% aws budgets describe-budget-actions-for-account --account-id 123456789012
{
"Actions": []
} Some sort of |
Cool, didnt experience this. will take a look regarding delete waiter. |
It may be a |
Co-authored-by: Kit Ewbank <Kit_Ewbank@hotmail.com>
Co-authored-by: Kit Ewbank <Kit_Ewbank@hotmail.com>
@ewbankkit added waiters but as you said there are no specific docs on this and i made a guess to what's right |
45469de
to
cf696de
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀.
Commercial
% make testacc TEST=./aws TESTARGS='-run=TestAccAWSBudgetsBudgetAction_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSBudgetsBudgetAction_ -timeout 180m
=== RUN TestAccAWSBudgetsBudgetAction_basic
=== PAUSE TestAccAWSBudgetsBudgetAction_basic
=== RUN TestAccAWSBudgetsBudgetAction_disappears
=== PAUSE TestAccAWSBudgetsBudgetAction_disappears
=== CONT TestAccAWSBudgetsBudgetAction_basic
=== CONT TestAccAWSBudgetsBudgetAction_disappears
--- PASS: TestAccAWSBudgetsBudgetAction_disappears (21.62s)
--- PASS: TestAccAWSBudgetsBudgetAction_basic (55.79s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 58.840s
GovCloud
% make testacc TEST=./aws TESTARGS='-run=TestAccAWSBudgetsBudgetAction_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSBudgetsBudgetAction_ -timeout 180m
=== RUN TestAccAWSBudgetsBudgetAction_basic
=== PAUSE TestAccAWSBudgetsBudgetAction_basic
=== RUN TestAccAWSBudgetsBudgetAction_disappears
=== PAUSE TestAccAWSBudgetsBudgetAction_disappears
=== CONT TestAccAWSBudgetsBudgetAction_basic
=== CONT TestAccAWSBudgetsBudgetAction_disappears
=== CONT TestAccAWSBudgetsBudgetAction_basic
provider_test.go:734: skipping tests; partition aws-us-gov does not support budgets service
=== CONT TestAccAWSBudgetsBudgetAction_disappears
provider_test.go:734: skipping tests; partition aws-us-gov does not support budgets service
--- SKIP: TestAccAWSBudgetsBudgetAction_basic (1.54s)
--- SKIP: TestAccAWSBudgetsBudgetAction_disappears (1.54s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 4.596s
@DrFaust92 Thanks for the contribution 🎉 👏. |
This functionality has been released in v3.46.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Community Note
Closes #19541
Output from acceptance testing: